<div class="photo">
    <a href="<?php echo Yii::app()->createUrl('site/viewphoto', array('id' => $data->id)); ?>"
       title="<?php echo $data->ten_hinh; ?>">
        <img src="server/php/thumbnails/<?php echo $data->id ?>.jpeg" />
    </a>
</div>